package com.example.springboot0507.config;

import com.example.springboot0507.entity.Product;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

/**
 * @Author 王博
 * @DateTime 2025-05-08 13:27
 */
@Configuration
public class ProfileConfig {
    @Value("${spring.profiles.active}")
    private String active;
    @Bean
    @Profile("dev")
    public Product product(){
        System.out.println(active);
        System.out.println("product");
        return new Product();
    }
}
